﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Core;
using System.Collections;

namespace Yuanlin.Business
{
    public class CompanyProductRequest : TEntityRequest<CompanyProduct>
    {
        public CompanyProductRequest()
        {
            int? entityId = GetParameterValue<int?>(YuanlinParameterName.CompanyProductId);
            if (entityId.HasValue)
            {
                EntityId = entityId.Value;
            }
        }
    }
    public class CompanyProductListRequest : TEntityListRequest<CompanyProduct>
    {
        #region Private Members

        private int? productCategoryId = GetParameterValue<int?>(YuanlinParameterName.ProductCategoryId);
        private string pinNameTitle = GetParameterValue<string>(YuanlinParameterName.PinNameTitle);
        private int? areaId = GetParameterValue<int?>(YuanlinParameterName.AreaId);
        private int? areaLevel = GetParameterValue<int?>(YuanlinParameterName.AreaLevel);
        private string tradeType = GetParameterValue<string>(YuanlinParameterName.TradeType);
        private int? userId = GetParameterValue<int?>(YuanlinParameterName.UserId);
        private int? noUserId = GetParameterValue<int?>(YuanlinParameterName.NoUserId); //把当前用户之外的找出来
        private string title = GetParameterValue<string>(YuanlinParameterName.Title);
        private string guiGeNames = GetParameterValue<string>(YuanlinParameterName.GuiGeNames);
        private string guiGeUnits = GetParameterValue<string>(YuanlinParameterName.GuiGeUnits);
        private string noQiuGou = GetParameterValue<string>(YuanlinParameterName.NoQiuGou);
        private string miJing = GetParameterValue<string>(YuanlinParameterName.MiJing);
        private string diJing = GetParameterValue<string>(YuanlinParameterName.DiJing);
        private int? verify = null;

        #endregion

        #region Public Properties

        public int? CategoryId
        {
            get
            {
                return productCategoryId;
            }
            set
            {
                productCategoryId = value;
            }
        }
        public string PinNameTitle
        {
            get
            {
                return pinNameTitle;
            }
            set
            {
                pinNameTitle = value;
            }
        }
        public int? AreaId
        {
            get
            {
                return areaId;
            }
            set
            {
                areaId = value;
            }
        }
        public int? AreaLevel
        {
            get
            {
                return areaLevel;
            }
            set
            {
                areaLevel = value;
            }
        }
        public string TradeType
        {
            get
            {
                return tradeType;
            }
            set
            {
                tradeType = value;
            }
        }
        public int? UserId
        {
            get
            {
                return userId;
            }
            set
            {
                userId = value;
            }
        }
        public int? NoUserId
        {
            get
            {
                return noUserId;
            }
            set
            {
                noUserId = value;
            }
        }
        public string Title
        {
            get
            {
                if (!string.IsNullOrEmpty(title))
                {
                    return string.Format("%{0}%", title);
                }
                return "";
            }
            set
            {
                title = value;
            }
        }
        public string GuiGeNames
        {
            get
            {
                return guiGeNames;
            }
            set
            {
                guiGeNames = value;
            }
        }
        public string GuiGeUnits
        {
            get
            {
                return guiGeUnits;
            }
            set
            {
                guiGeUnits = value;
            }
        }
        public string NoQiuGou
        {
            get
            {
                return noQiuGou;
            }
            set
            {
                noQiuGou = value;
            }
        }
        public string MiJing
        {
            get
            {
                return miJing;
            }
            set
            {
                miJing = value;
            }
        }
        public string DiJing
        {
            get
            {
                return diJing;
            }
            set
            {
                diJing = value;
            }
        }
        public int? Verify
        {
            get
            {
                return verify;
            }
            set
            {
                verify = value;
            }
        }

        #endregion

    }
    public class CompanyProductReply : EntityReply
    {
    }
}